﻿@model VacationsRequest.Models.VacationApproval
@{
    ViewBag.Title = "Delete a Approval";
}
<h2>
    Delete</h2>
<h3>
    Are you sure you want to delete this?</h3>
<fieldset>
    <legend>VacationApproval</legend>
    <div style="display: table; width: 100%">
        <div style="display: table-row">
            <div style="display: table-cell">
                <div class="display-label">
                    Approver</div>
                <div class="display-field">
                    @ViewBag.ApproverName
                </div>
            </div>
            <div style="display: table-cell">
                <div class="display-label">
                    Date Created</div>
                <div class="display-field">
                    @Html.DisplayFor(model => model.DateCreated)
                </div>
            </div>
            <div style="display: table-cell">
                <div class="display-label">
                    From Date</div>
                <div class="display-field">
                    @Html.DisplayFor(model => model.FromDate)
                </div>
            </div>
        </div>
        <div style="display: table-row">
            <div style="display: table-cell">
                <div class="display-label">
                    To Date</div>
                <div class="display-field">
                    @Html.DisplayFor(model => model.ToDate)
                </div>
            </div>
            <div style="display: table-cell">
                <div class="display-label">
                    Status</div>
                <div class="display-field">
                    @Html.DisplayFor(model => model.Status.Description)
                </div>
            </div>
            <div style="display: table-cell">
                <div class="display-label">
                    Number of Days Reserved</div>
                <div class="display-field">
                    @Html.DisplayFor(model => model.NumDays)
                </div>
            </div>
        </div>
    </div>
    <div class="display-label">
        Comment</div>
    <div class="display-field">
        @Html.DisplayFor(model => model.Comment)
    </div>
</fieldset>
@using (Html.BeginForm())
{
    <p>
        <input type="submit" value="Delete" />
        |
        @if (User.IsInRole("Administrator"))
        {
            @Html.ActionLink("Back to List", "Index", "Employees")
        }
        else
        {
            @Html.ActionLink("Back to Vacation Scheduler", "EmployeeDetails", "VacationDays", new { id = Model.IdEmployee }, "")
        }
    </p>
}
